package ua.kpi.ipsa.expert.api.net;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.*;


/**
 * 
 * @author doctorpro
 *
 */
public interface AdminsConsole extends Remote {
	
	/**
	 * 
	 * @return
	 */
	public List<String> getUsers() throws RemoteException;
	
	/**
	 * 
	 * @param userLogin
	 * @return
	 * @throws RemoteException
	 */
	public boolean isUserLogged(String userLogin) throws RemoteException;

	/**
	 * 
	 * @param login
	 * @return
	 * @throws RemoteException
	 */
	public boolean userExists(String login) throws RemoteException;
	
	/**
	 * 
	 * @param userLogin
	 * @throws RemoteException
	 * @throws ConsoleException
	 */
	public void dropUser(String userLogin) throws RemoteException,
			ConsoleException;

	/**
	 * 
	 * @param userLogin
	 * @param userPassword
	 * @throws RemoteException
	 * @throws ConsoleException
	 */
	public void addUser(String userLogin, String userPassword)
			throws RemoteException, ConsoleException;

	/**
	 * 
	 * @param userLogin
	 * @throws RemoteException
	 * @throws ConsoleException
	 */
	public void removeUser(String userLogin) throws RemoteException,
			ConsoleException;

	/**
	 * 
	 * @param userLogin
	 * @param oldPassword
	 * @param newPassword
	 * @throws RemoteException
	 * @throws ConsoleException
	 */
	public void changePassword(String userLogin, String oldPassword,
			String newPassword) throws RemoteException, ConsoleException;

	/**
	 * 
	 * @param l
	 * @throws RemoteException
	 */
	public void setRemoteUserListener(RemoteUserListener l)
			throws RemoteException;
	
	/**
	 * 
	 * @return
	 * @throws RemoteException
	 */
	public boolean assertOnline() throws RemoteException;
	
	/**
	 * 
	 * @throws RemoteException
	 */
	public void shutdownServer() throws RemoteException;
}
